package schedule;

import action.ActionPool;

/**
 * 
 * @author Minodor
 * 
 *         Builds a schedule from the actionPool for a giver Person name;
 */
public class ScheduleBuilder {

	public static Schedule buildSchedule(String owner, String date) {
		Schedule newSchedule = new RawSchedule();
		for (int index = 0; index < ActionPool.getCount(); index++) {
			if (ActionPool.get(index).getOnwer().equalsIgnoreCase(owner)
					&& ActionPool.get(index).getDate().equalsIgnoreCase(date))
				newSchedule.add(ActionPool.get(index));
		}
		return newSchedule;
	}

}
